<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
    <script type="text/javascript" src="easyui/jquery.min.js"></script>
    <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
    <script>
        $(function(){
            $('#dd').dialog({
                title: '添加用户',
                width: 400,
                height: 200,
                closed: true,   // 默认是否关闭
                modal: true, // 是否显示为模态框
                iconCls:'icon-save',
                // maximizable:true,
                // minimizable:true,
                // collapsible:true
                // resizable:true
                buttons:[
                    {
                        text:'确定',
                        iconCls:'icon-ok',
                        handler:function(){
                            $('#dd').dialog('close'); // 关闭窗口
                        }
                    },
                    {
                        text:'取消',
                        iconCls:'icon-no',
                        handler:function(){
                            $('#dd').dialog('close'); // 关闭窗口
                        }
                    },
                ]

            });
        
            $('#btnAdd').linkbutton({
                iconCls:'icon-add',
                onClick(){
                    $('#dd').dialog('open');
                }
            });
        });
    </script>
</head>
<body>
    <button id="btnAdd">添加用户</button>

    <div id="dd" style="padding-top: 20px;text-align: center;">
        <div style="margin-bottom:20px">
            <input class="easyui-textbox" data-options="label:'用户名：',required:true" style="width:70%">
        </div>
        <div style="margin-bottom:20px">
            <input class="easyui-textbox" data-options="label:'密码：',required:true" style="width:70%">
        </div>
    </div>
</body>
</html>